package controller;

import service.Impl.PickNameServiceImpl;
import service.PickNameServcie;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet("/DeleteNameServlet")
public class DeleteNameServlet extends HttpServlet {
    private PickNameServcie ps = new PickNameServiceImpl();
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        ps.clearFile();
        resp.setContentType("text/html;charset=utf-8");
        resp.getWriter().write("学生名单已经全部清空啦");
    }
}
